<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>对 AI Agent 的一些粗浅理解 | Dingzh's Blog</title><meta name="keywords" content="AI,Agent"><meta name="author" content="Dingzh"><meta name="copyright" content="Dingzh"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="总结我目前 AI Agent 的一些粗浅理解"><meta property="og:type" content="article"><meta property="og:title" content="对 AI Agent 的一些粗浅理解"><meta property="og:url" content="https://dingzh.cc/posts/d4e383e3.html"><meta property="og:site_name" content="Dingzh&#39;s Blog"><meta property="og:description" content="总结我目前 AI Agent 的一些粗浅理解"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover217.jpg"><meta property="article:published_time" content="2025-11-09T06:04:32.000Z"><meta property="article:modified_time" content="2025-11-11T15:48:16.898Z"><meta property="article:author" content="Dingzh"><meta property="article:tag" content="AI"><meta property="article:tag" content="Agent"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover217.jpg"><link rel="shortcut icon" href="https://alicdn.dingzh.cc/ding-BlogDemo/img/Favicon.png"><link rel="canonical" href="https://dingzh.cc/posts/d4e383e3"><link rel="preconnect" href="//cdn.jsdelivr.net"><link rel="preconnect" href="//busuanzi.ibruce.info"><link rel="manifest" href="/manifest.json"><meta name="msapplication-TileColor" content="#f7cb98"><link rel="apple-touch-icon" sizes="180x180" href="https://alicdn.dingzh.cc/ding-BlogDemo/img/siteicon/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="https://alicdn.dingzh.cc/ding-BlogDemo/img/siteicon/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="https://alicdn.dingzh.cc/ding-BlogDemo/img/siteicon/favicon-16x16.png"><link rel="mask-icon" href="https://alicdn.dingzh.cc/ding-BlogDemo/img/siteicon/safari-pinned-tab.svg" color="#5bbad5"><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://npm.elemecdn.com/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="https://npm.elemecdn.com/node-snackbar/dist/snackbar.min.css" media="print" onload='this.media="all"'><script>const GLOBAL_CONFIG={root:"/",algolia:void 0,localSearch:{path:"search.xml",languages:{hits_empty:"找不到您查询的内容：${query}"}},translate:void 0,noticeOutdate:void 0,highlight:{plugin:"highlighjs",highlightCopy:!0,highlightLang:!0,highlightHeightLimit:250},copy:{success:"复制成功",error:"复制错误",noSupport:"浏览器不支持"},relativeDate:{homepage:!1,post:!1},runtime:"天",date_suffix:{just:"刚刚",min:"分钟前",hour:"小时前",day:"天前",month:"个月前"},copyright:void 0,lightbox:"fancybox",Snackbar:{chs_to_cht:"你已切换为繁体",cht_to_chs:"你已切换为简体",day_to_night:"你已切换为深色模式",night_to_day:"你已切换为浅色模式",bgLight:"#ff6262",bgDark:"#7a3939",position:"top-center"},source:{jQuery:"https://npm.elemecdn.com/jquery@latest/dist/jquery.min.js",justifiedGallery:{js:"https://npm.elemecdn.com/justifiedGallery/dist/js/jquery.justifiedGallery.min.js",css:"https://npm.elemecdn.com/justifiedGallery/dist/css/justifiedGallery.min.css"},fancybox:{js:"https://alicdn.dingzh.cc/ding-BlogDemo/js/other/jquery.fancybox.min.js",css:"https://npm.elemecdn.com/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css"}},isPhotoFigcaption:!1,islazyload:!0,isanchor:!1}</script><script id="config-diff">var GLOBAL_CONFIG_SITE={title:"对 AI Agent 的一些粗浅理解",isPost:!0,isHome:!1,isHighlightShrink:!1,isToc:!0,postUpdate:"2025-11-11 23:48:16"}</script><noscript><style>#nav{opacity:1}.justified-gallery img{opacity:1}#post-meta time,#recent-posts time{display:inline!important}</style></noscript><script>(e=>{e.saveToLocal={set:function(e,t,o){if(0===o)return;const n=864e5*o,a={value:t,expiry:(new Date).getTime()+n};localStorage.setItem(e,JSON.stringify(a))},get:function(e){const t=localStorage.getItem(e);if(!t)return;const o=JSON.parse(t);if(!((new Date).getTime()>o.expiry))return o.value;localStorage.removeItem(e)}},e.getScript=e=>new Promise((t,o)=>{const n=document.createElement("script");n.src=e,n.async=!0,n.onerror=o,n.onload=n.onreadystatechange=function(){const e=this.readyState;e&&"loaded"!==e&&"complete"!==e||(n.onload=n.onreadystatechange=null,t())},document.head.appendChild(n)}),e.activateDarkMode=function(){document.documentElement.setAttribute("data-theme","dark"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#0d0d0d")},e.activateLightMode=function(){document.documentElement.setAttribute("data-theme","light"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#ffffff")};const t=saveToLocal.get("theme"),o=(new Date).getHours();void 0===t?o<=6||o>=18?activateDarkMode():activateLightMode():"light"===t?activateLightMode():activateDarkMode();const n=saveToLocal.get("aside-status");void 0!==n&&("hide"===n?document.documentElement.classList.add("hide-aside"):document.documentElement.classList.remove("hide-aside"));const a=saveToLocal.get("global-font-size");void 0!==a&&document.documentElement.style.setProperty("--global-font-size",a+"px");const c=()=>{GLOBAL_CONFIG_SITE.isHome&&/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)&&document.documentElement.classList.add("apple")};c(),document.addEventListener("pjax:complete",c)})(window)</script><script defer src="https://alicdn.dingzh.cc/ding-BlogDemo/js/custom/randombg.min.js"></script><svg aria-hidden="true" style="position:absolute;overflow:hidden;width:0;height:0"><symbol id="icon-sun" viewBox="0 0 1024 1024"><path d="M960 512l-128 128v192h-192l-128 128-128-128H192v-192l-128-128 128-128V192h192l128-128 128 128h192v192z" fill="#FFD878" p-id="8420"></path><path d="M736 512a224 224 0 1 0-448 0 224 224 0 1 0 448 0z" fill="#FFE4A9" p-id="8421"></path><path d="M512 109.248 626.752 224H800v173.248L914.752 512 800 626.752V800h-173.248L512 914.752 397.248 800H224v-173.248L109.248 512 224 397.248V224h173.248L512 109.248M512 64l-128 128H192v192l-128 128 128 128v192h192l128 128 128-128h192v-192l128-128-128-128V192h-192l-128-128z" fill="#4D5152" p-id="8422"></path><path d="M512 320c105.888 0 192 86.112 192 192s-86.112 192-192 192-192-86.112-192-192 86.112-192 192-192m0-32a224 224 0 1 0 0 448 224 224 0 0 0 0-448z" fill="#4D5152" p-id="8423"></path></symbol><symbol id="icon-moon" viewBox="0 0 1024 1024"><path d="M611.370667 167.082667a445.013333 445.013333 0 0 1-38.4 161.834666 477.824 477.824 0 0 1-244.736 244.394667 445.141333 445.141333 0 0 1-161.109334 38.058667 85.077333 85.077333 0 0 0-65.066666 135.722666A462.08 462.08 0 1 0 747.093333 102.058667a85.077333 85.077333 0 0 0-135.722666 65.024z" fill="#FFB531" p-id="11345"></path><path d="M329.728 274.133333l35.157333-35.157333a21.333333 21.333333 0 1 0-30.165333-30.165333l-35.157333 35.157333-35.114667-35.157333a21.333333 21.333333 0 0 0-30.165333 30.165333l35.114666 35.157333-35.114666 35.157334a21.333333 21.333333 0 1 0 30.165333 30.165333l35.114667-35.157333 35.157333 35.157333a21.333333 21.333333 0 1 0 30.165333-30.165333z" fill="#030835" p-id="11346"></path></symbol></svg><link rel="stylesheet" href="https://alicdn.dingzh.cc/ding-BlogDemo/css/card.min.css" media="defer" onload='this.media="all"'><link rel="stylesheet" href="https://alicdn.dingzh.cc/ding-BlogDemo/clock/clock.min.css"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="https://alicdn.dingzh.cc/ding-BlogDemo/css/swiperstyle.min.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-wowjs/lib/animate.min.css" media="print" onload='this.media="screen"'><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/assets/font-awesome-animation.min.css" media="defer" onload='this.media="all"'><link rel="stylesheet" href="https://alicdn.dingzh.cc/ding-BlogDemo/css/tag_plugins.min.css" media="defer" onload='this.media="all"'><meta name="generator" content="Hexo 6.0.0"></head><body><a href="javascript:void(0);" onclick="preloader.endLoading()" title="点击跳过动画"><div id="loading-box"><div class="pokeball-back"></div><div class="pokeball-loading"><div class="pokeball" id="pokeball-normal"></div><div class="pokeball" id="pokeball-great"></div><div class="pokeball" id="pokeball-ultra"></div><div class="pokeball" id="pokeball-master"></div><div class="pokeball" id="pokeball-safari"></div></div></div></a><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/head1.jpg" onerror='onerror=null,src="https://alicdn.dingzh.cc/ding-BlogDemo/img/imgLink_404.gif"' alt="avatar"></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">38</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">49</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div></div></div><hr><div class="menus_items"><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-shouye"></use></svg> <span>首页</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:void(0);"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-zixun"></use></svg> <span>文章</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/archives/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-danganku"></use></svg> <span>归档</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/tags/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-biaoqian"></use></svg> <span>标签</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/categories/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-wenjianjia"></use></svg> <span>分类</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:void(0);"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-guochandonghuatuijian"></use></svg> <span>动漫</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/anime/tv/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-anime"></use></svg> <span>季度</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/anime/collect/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-a-vpszhujifuwuqiwangluo"></use></svg> <span>藏馆</span></a></li><li><a class="site-page child faa-parent animated-hover" target="_blank" rel="noopener" href="https://github.com/rplalala/MySubTittle"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-dianying"></use></svg> <span>字幕</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:void(0);"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-a-switch2"></use></svg> <span>其他</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/gallery/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-xiangce"></use></svg> <span>图库</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/artitalk/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-pinglun1"></use></svg> <span>随言</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/messageboard/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-rili"></use></svg> <span>留言板</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:void(0);"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-youqinglianjie"></use></svg> <span>链接</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/link/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-friendship"></use></svg> <span>友链</span></a></li><li><a class="site-page child faa-parent animated-hover" target="_blank" rel="noopener" href="https://vercel.dingzh.cc"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-a-internethulianwangwangluo"></use></svg> <span>镜像</span></a></li><li><a class="site-page child faa-parent animated-hover" href="https://dingzh.cc"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-a-vpszhujifuwuqiwangluo"></use></svg> <span>主站</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/about/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-wode2"></use></svg> <span>关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image:url(https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover217.jpg)"><nav id="nav"><span id="blog_name"><a id="site-name" onclick="btf.scrollToDest(0,500)" data-title="总结我目前 AI Agent 的一些粗浅理解">对 AI Agent 的一些粗浅理解</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search faa-parent animated-hover"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-sousuo4"></use></svg> <span>搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-shouye"></use></svg> <span>首页</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:void(0);"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-zixun"></use></svg> <span>文章</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/archives/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-danganku"></use></svg> <span>归档</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/tags/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-biaoqian"></use></svg> <span>标签</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/categories/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-wenjianjia"></use></svg> <span>分类</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:void(0);"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-guochandonghuatuijian"></use></svg> <span>动漫</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/anime/tv/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-anime"></use></svg> <span>季度</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/anime/collect/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-a-vpszhujifuwuqiwangluo"></use></svg> <span>藏馆</span></a></li><li><a class="site-page child faa-parent animated-hover" target="_blank" rel="noopener" href="https://github.com/rplalala/MySubTittle"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-dianying"></use></svg> <span>字幕</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:void(0);"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-a-switch2"></use></svg> <span>其他</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/gallery/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-xiangce"></use></svg> <span>图库</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/artitalk/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-pinglun1"></use></svg> <span>随言</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/messageboard/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-rili"></use></svg> <span>留言板</span></a></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="javascript:void(0);"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-youqinglianjie"></use></svg> <span>链接</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/link/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-friendship"></use></svg> <span>友链</span></a></li><li><a class="site-page child faa-parent animated-hover" target="_blank" rel="noopener" href="https://vercel.dingzh.cc"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-a-internethulianwangwangluo"></use></svg> <span>镜像</span></a></li><li><a class="site-page child faa-parent animated-hover" href="https://dingzh.cc"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-a-vpszhujifuwuqiwangluo"></use></svg> <span>主站</span></a></li></ul></div><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/about/"><svg class="icon faa-tada" aria-hidden="true"><use xlink:href="#icon-wode2"></use></svg> <span>关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">对 AI Agent 的一些粗浅理解<a class="post-edit-link" href="https://github.com/rplalala/BlogSource/edit/main/source/_posts/对-Ai-Agent-的一些粗浅理解.md" title="编辑" target="_blank"><i class="fas fa-pencil-alt"></i></a></h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2025-11-09T06:04:32.000Z" title="发表于 2025-11-09 14:04:32">2025-11-09</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2025-11-11T15:48:16.898Z" title="更新于 2025-11-11 23:48:16">2025-11-11</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/AI/">AI</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">3.8k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>12分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" data-flag-title="对 AI Agent 的一些粗浅理解"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h2 id="概要"><a href="#概要" class="headerlink" title="概要"></a>概要</h2><p>先明确一点，Agent 并不是一个实际存在的东西，更像一种<strong>架构模式</strong>，类似于 workflow（工作流）。它把 大语言模型（LLM）和服务端（工具/函数调用）结合起来，让 AI 既能“想”（理解/生成文本），又能“动手”（调用外部服务/函数），还能“自己决定下一步做什么”（自主选择工具与推进流程）。这种模式通常包含三大部分：</p><ul><li><strong>后端服务 = 手</strong>：执行动作（读写数据、调接口、调度、通知），不“思考”。其实现在流行的 MCP Server 就是一个用了 MCP 协议的后端服务，在 Agent 架构中帮助大模型“动手”。</li><li><strong>LLM（Large Language Model 大语言模型） = 脑</strong>：理解/生成文本，会“想”，但不“动手”。</li><li><strong>Agent = 脑 + 手 + 脑神经</strong>：<ul><li><strong>脑（大模型）</strong>：看懂需求、拿主意，产出下一步意图（tool_call（tool_name + args）或直接回复）。</li><li><strong>手（后端服务）</strong>：把模型的 tool_call 变成真实动作，调用服务/数据库、执行工具函数、发通知等，并负责<strong>鉴权、参数校验、限流</strong>等护栏。</li><li><strong>脑神经（受控流程/状态机）</strong>：充当裁判与调度器。后端先画好可走的几条路和可用工具清单，AI 在这个受控范围内自主决定下一步（继续 / 停止 / 回调）。</li></ul></li></ul><blockquote><p>总之就是，脑做“决定”，神经管“分配”，手来“执行”。<strong>Agent 让 AI 既能“想”，又能“动手”，还能“自己决定下一步做什么”</strong></p></blockquote><h2 id="误区点（workflow-vs-Agent）"><a href="#误区点（workflow-vs-Agent）" class="headerlink" title="误区点（workflow vs Agent）"></a>误区点（workflow vs Agent）</h2><div class="note warning no-icon simple"><p>我的理解是，<strong>Agent &ne; AI Chat + 后端服务</strong>，AI Chat + 后端服务更像是 <strong>AI 参与的工作流</strong>，AI 在这个工作流中只负责生成内容（返回文本/JSON），而函数的调用与整体流程都是在后端解析AI生成的文本后写死的，比如：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">用户：帮我查一下今天的天气。</span><br><span class="line">↓</span><br><span class="line">系统 Prompt：当用户询问天气信息时，请返回严格的 JSON 格式，如 &#123;Temperature: XX, Condition: &quot;Sunny&quot;&#125;）</span><br><span class="line">↓</span><br><span class="line">模型：&#123;Temperature: 25, Condition: &quot;Sunny&quot;&#125;</span><br><span class="line">↓</span><br><span class="line">后端：解析模型返回的 JSON，调用并执行 send_email(to=&quot;user@example.com&quot;, subject=&quot;今日天气&quot;, body=&quot;今天天气晴，温度25度。&quot;)</span><br></pre></td></tr></table></figure><p>在这个例子里，AI 只是负责返回天气信息，后端（服务端）负责解析 AI 返回的内容并执行发送邮件的动作。</p></div><h2 id="进一步区分（function-call-vs-自主推进）"><a href="#进一步区分（function-call-vs-自主推进）" class="headerlink" title="进一步区分（function_call vs 自主推进）"></a>进一步区分（function_call vs 自主推进）</h2><div class="note warning no-icon simple"><p>还有一种情况是 <strong>AI Chat + AI 调用工具/函数 → 服务端执行，但整体流程仍然写死</strong>，这种更接近 Agent，已经能够实现<strong>自主调用</strong>函数/工具（function_call），但仍然不具备<strong>自主推进</strong>。</p><blockquote><p>PS: 自主调用并不是指模型自己真的执行了函数，而是告诉后端“我想调用这个函数+参数”，让后端去执行。function_call 在目前先进的大模型版本中已经普遍支持，原理就是把这部分内容加入训练数据，让模型学会在合适的时机输出特定格式的调用指令，但其实用旧模型+合适的 Prompt 也能实现类似效果。</p></blockquote><p>但如果仅是<strong>选函数 + 给参数</strong>且流程/分支<strong>固定</strong>，那我觉得也依旧只是<strong>AI 参与的工作流</strong>，因为整体流程与分支依旧是<strong>写死的</strong>。相比于单纯的 AI Chat + 后端服务，这只是把后端服务中定义并执行函数的那一小段逻辑抽离出来一个工具调用层，并让大模型的输出变成规范的 function_call 格式（function_name (function_params)），负责选择调用哪个函数和传入什么参数而已，但整体流程依旧是写死的，没有实现<strong>自主推进</strong>。比如：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">用户：帮我查一下今天的天气，然后发邮件通知我。</span><br><span class="line">↓</span><br><span class="line">模型：调用（告诉后端，我想执行）get_weather(location=&quot;current_location&quot;)</span><br><span class="line">↓</span><br><span class="line">后端：执行 get_weather → 返回结果 &#123;temp:25, condition:&quot;Rain&quot;, precipProb:0.7&#125; 给模型</span><br><span class="line">↓</span><br><span class="line">模型：调用（告诉后端，我想执行）send_email(to=&quot;user@example.com&quot;, subject=&quot;今日天气&quot;, body=&quot;今天天气晴，温度25度。&quot;)</span><br><span class="line">↓</span><br><span class="line">后端：执行 send_email，用户收到邮件，完成任务。</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>在这个例子里，AI 负责选择调用哪些函数以及传入什么参数，但整体流程依旧是<strong>写死的</strong>（先查天气，然后发邮件），没有 AI 自主决定下一步做什么。就算用户要求“如果天气不好就顺便帮我订一辆出租车”，但由于流程写死，AI 也无法主动插入“订车”这一步骤。</p></div><h2 id="真正的-Agent（function-call-自主推进）"><a href="#真正的-Agent（function-call-自主推进）" class="headerlink" title="真正的 Agent（function_call + 自主推进）"></a>真正的 Agent（function_call + 自主推进）</h2><div class="note warning no-icon simple"><p>真正的 Agent 应该是让 AI 参与到“选择与决策”（选哪个工具、用什么参数、是否继续/停止/回调），让 AI 决定“下一步做什么”，并且能多轮闭环（感知→计划→调用工具→观察→再计划）推进直到达成目标。比如：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">用户：帮我查一下今天的天气，然后发邮件通知我，如果天气不好就顺便帮我订一辆出租车。</span><br><span class="line">↓</span><br><span class="line">模型：调用（告诉后端，我想执行）get_weather(&#123; location: &quot;current_location&quot; &#125;)</span><br><span class="line">↓</span><br><span class="line">后端：执行 get_weather → 返回结果 &#123;temp:25, condition:&quot;Rain&quot;, precipProb:0.7&#125; 给模型</span><br><span class="line">↓</span><br><span class="line">模型：观察结果 → 在受控分支内决策</span><br><span class="line">  ├─ 若天气不好：</span><br><span class="line">  │    模型：调用（告诉后端，我想执行）book_taxi(&#123; pickup:&quot;current_location&quot;, destination:&quot;home&quot; &#125;)</span><br><span class="line">  │      ↓</span><br><span class="line">  │    后端：执行 book_taxi → 返回结果 &#123; bookingId:&quot;tx-123&quot; &#125; 给模型</span><br><span class="line">  │</span><br><span class="line">  └─ 若天气良好：跳过订车</span><br><span class="line">↓</span><br><span class="line">模型：调用（告诉后端，我想执行）send_email(&#123;</span><br><span class="line">        to:&quot;user@example.com&quot;,</span><br><span class="line">        subject:&quot;今日天气&quot;,</span><br><span class="line">        body: weather.bad</span><br><span class="line">              ? &quot;今天天气较差，已为你订车：tx-123。&quot;</span><br><span class="line">              : &quot;今天天气晴，温度25°。&quot;</span><br><span class="line">     &#125;)</span><br><span class="line">↓</span><br><span class="line">后端：执行 send_email，用户收到邮件，完成任务。</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>在这个例子里，后端只用<strong>状态机/图</strong>定义了<strong>最小骨架流程</strong>，并约束 AI <strong>在指定的流程内选择</strong>，如 start → get_weather → {book_taxi?} → send_email → done（有分支，不是写死的），而要走哪条边是 AI <strong>在受控范围内自己决定的</strong>。AI 会根据天气结果决定是否需要订车，然后再发邮件通知用户，最终达成用户目标。</p></div><hr><h2 id="Agent-与工作流"><a href="#Agent-与工作流" class="headerlink" title="Agent 与工作流"></a>Agent 与工作流</h2><p><strong>先明确一点：</strong> Agent 不是“完全自主调配，没有流程限制”，而是<strong>先用状态机/图把“可走的边”和“可用的工具”定义好</strong>，由模型在<strong>这些受控选项</strong>里做选择与多轮推进。所以我认为 Agent 也算是一种特殊的 workflow 架构，毕竟 Agent 依旧是在一个“预定义的流程图”里走动，只不过这个流程图允许 AI 在“节点间的分支”和“工具调用”上做自主选择。而且真正执行函数的部分仍然是服务端在做（比如说 MCP Server / 自己写的工具调用层），AI 只是告诉你它想调用哪个函数。（PS: 看到过一个博客，提出用训练过的神经网络来代替用于执行的服务端，不需要人去定义函数，而是由 AI 完全自主执行，但我觉得目前还不现实，且风险太大，但值得探索。）</p><div class="table-container"><table><thead><tr><th>维度</th><th>普通工作流</th><th>AI 参与的工作流</th><th><strong>AI Agent（有界自治）</strong></th></tr></thead><tbody><tr><td>谁决定“下一步”</td><td>写死（if/else）</td><td>主干写死，某些节点让 AI 生成内容</td><td><strong>LLM 在受控分支/给定的工具函数内做策略选择</strong></td></tr><tr><td>工具/函数调用</td><td>固定</td><td>多为固定或半自动</td><td><strong>函数/工具调用（function_name+function_args）自动选择与多步闭环</strong></td></tr><tr><td>执行/副作用</td><td>后端</td><td>后端</td><td><strong>仍是服务端执行</strong>（工具层/服务层，比如说 MCP Server）</td></tr><tr><td>自由度</td><td>低</td><td>中（内容可变）</td><td><strong>高（策略可变，路径可变，但有约束）</strong></td></tr><tr><td>可靠性/可测性</td><td>高</td><td>中高</td><td>取决于约束范围略</td></tr><tr><td>典型实现</td><td>编排引擎/规则引擎</td><td>编排 + 模型生成环节</td><td><strong>状态机/图（如 LangGraph），函数调用 + 结果回馈 + 再计划</strong></td></tr><tr><td>何时选用</td><td>流程刚性、合规强</td><td>流程稳定但需智能生成</td><td><strong>目标模糊/信息缺口大/需要动态工具组合</strong></td></tr></tbody></table></div><h2 id="一个典型的-Agent-工作流程示例"><a href="#一个典型的-Agent-工作流程示例" class="headerlink" title="一个典型的 Agent 工作流程示例"></a>一个典型的 Agent 工作流程示例</h2><p><strong>人 → Agent：</strong> 我有个问题“xxxx”，帮我解决一下！</p><p><strong>Agent → MCP Server：</strong> 喂！我有个用户问题“xxxx”，你这边有什么工具能帮忙解决的？</p><p><strong>MCP Server → Agent：</strong> 我有这些，使用方法是这样的 function_name, function_params，有需要时可以叫我。</p><p><strong>Agent → LLM：</strong> 现在有个人问“xxxx”，你帮回答一下，另外，还有这些关键信息（提示词，RAG 知识库）和一些工具（MCP Server 提供的 function）供你使用，使用方法是输出 function_name + function_params。好了，干活去吧。</p><p><strong>LLM → Agent：</strong> 哇，这个问题挺复杂的，我需要先查点资料，让我看看 MCP Server 那边有什么工具能帮我查资料的。OK，我查到了 MCP Server 那边有个网上查询的工具，我就用它吧。喂，Agent，帮我跟 MCP Server 说，我要用它提供的这个网上查询工具，方法名是 search_online，参数是这个关键词“yyyy”，我已经转化成你们要求的格式了：</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">  <span class="attr">&quot;type&quot;</span>: <span class="string">&quot;function_call&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;function_id&quot;</span>: <span class="string">&quot;mcp_server_001&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;function_name&quot;</span>: <span class="string">&quot;search_online&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;function_params&quot;</span>: &#123;</span><br><span class="line">     <span class="attr">&quot;type&quot;</span>: <span class="string">&quot;string&quot;</span>,</span><br><span class="line">     <span class="attr">&quot;query&quot;</span>: <span class="string">&quot;yyyy&quot;</span></span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p><strong>Agent → MCP Server：</strong> 喂！大模型要用你写好的的网上查询工具，方法名是 search_online，参数是这个关键词“yyyy”，具体格式是这样的 （json 如上），你帮忙执行一下！</p><p><strong>MCP Server → Agent：</strong> 好的，我这就执行，稍等。OK，执行完毕，结果是这样的，麻烦你转交给大模型：</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">   <span class="attr">&quot;results&quot;</span>: [</span><br><span class="line">       <span class="string">&quot;资料1内容……&quot;</span>,</span><br><span class="line">       <span class="string">&quot;资料2内容……&quot;</span>,</span><br><span class="line">       <span class="string">&quot;资料3内容……&quot;</span></span><br><span class="line">   ]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p><strong>Agent → LLM：</strong> 喏，你要的资料，MCP Server 给你查到了，结果是这样的 （json 如上）</p><p><strong>LLM → Agent：</strong> OK，有了这些资料我就能继续思考了，让我再想想。。。嗯，我觉得我还需要一些客户的具体信息才能更好地回答这个问题。让我看看 MCP Server 那边有没有提供相关的工具能帮我查客户信息的。OK，我看到了个客户信息查询的工具，我就用它吧。喂，Agent，帮我跟 MCP Server 说，我要它执行这个客户信息查询工具，方法名是 get_customer_info，参数是这个客户ID“12345”，我已经转化成你们要求的格式了：</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">  <span class="attr">&quot;type&quot;</span>: <span class="string">&quot;function_call&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;function_id&quot;</span>: <span class="string">&quot;mcp_server_002&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;function_name&quot;</span>: <span class="string">&quot;get_customer_info&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;function_params&quot;</span>: &#123;</span><br><span class="line">     <span class="attr">&quot;type&quot;</span>: <span class="string">&quot;string&quot;</span>,</span><br><span class="line">     <span class="attr">&quot;customer_id&quot;</span>: <span class="string">&quot;12345&quot;</span></span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p><strong>Agent → MCP Server：</strong> 喂！大模型要用你写好的客户信息查询工具，方法名是 get_customer_info，参数是这个客户ID“12345”，具体格式是这样的 （json 如上），你帮忙执行一下！</p><p><strong>MCP Server → Agent：</strong> 好的，我这就执行，稍等。。。。OK，执行完毕，结果是这样的，麻烦你转交给大模型：</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">   <span class="attr">&quot;customer_info&quot;</span>: &#123;</span><br><span class="line">       <span class="attr">&quot;name&quot;</span>: <span class="string">&quot;张三&quot;</span>,</span><br><span class="line">       <span class="attr">&quot;age&quot;</span>: <span class="number">30</span>,</span><br><span class="line">       <span class="attr">&quot;membership_level&quot;</span>: <span class="string">&quot;黄金会员&quot;</span>,</span><br><span class="line">       <span class="attr">&quot;purchase_history&quot;</span>: [</span><br><span class="line">           <span class="string">&quot;订单1详情……&quot;</span>,</span><br><span class="line">           <span class="string">&quot;订单2详情……&quot;</span></span><br><span class="line">       ]</span><br><span class="line">   &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p><strong>Agent → LLM：</strong> 喏，你要的客户信息，MCP Server 给你查到了，结果是这样的 （json 如上）。你看看吧，还有什么需要随时跟我说。</p><p><strong>LLM → Agent：</strong> OK，有了这些客户信息就好办了，我查查前面告诉我的资料和 MCP Server 提供的其他工具。。。。完美，我已经知道怎么解决了。喂，Agent，帮我跟 MCP Server 说，我要它执行这个工具，执行完后应该就能解决用户的问题了，方法名是 xxx，参数是 yyy 和 zzz，我已经转化成你们要求的格式了：</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">  <span class="attr">&quot;type&quot;</span>: <span class="string">&quot;function_call&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;function_id&quot;</span>: <span class="string">&quot;mcp_server_003&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;function_name&quot;</span>: <span class="string">&quot;xxx&quot;</span>,</span><br><span class="line">  <span class="attr">&quot;function_params&quot;</span>: &#123;</span><br><span class="line">     <span class="attr">&quot;param1&quot;</span>: <span class="string">&quot;yyy&quot;</span>,</span><br><span class="line">     <span class="attr">&quot;param2&quot;</span>: <span class="string">&quot;zzz&quot;</span></span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p><strong>Agent → MCP Server：</strong> 喂！大模型要用你写好的这个工具，方法名是 xxx，参数是 yyy 和 zzz，具体格式是这样的 （json 如上），你帮忙执行一下！</p><p><strong>MCP Server → Agent：</strong> 好的，我这就执行，稍等。。。。OK，执行完毕，这次执行产生了 xxx 的副作用，这是函数的响应结果，麻烦你转交给大模型，让它检查一下：</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">   <span class="attr">&quot;code&quot;</span>: <span class="number">200</span>,</span><br><span class="line">   <span class="attr">&quot;message&quot;</span>: <span class="string">&quot;操作成功&quot;</span>,</span><br><span class="line">   <span class="attr">&quot;data&quot;</span>: &#123;</span><br><span class="line">       ... <span class="comment">// 具体结果内容</span></span><br><span class="line">   &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p><strong>Agent → LLM：</strong> 喏，MCP Server 执行完毕，响应结果是这样的 （json 如上），你看看正确不正确。</p><p><strong>LLM → Agent：</strong> 太棒了，结果完全符合预期，操作成功！我们现在可以休息了。我最后整理一下这次解决问题的思路和结果，你帮我转交给用户吧：“亲，关于您的问题，我们已经帮你解决好了。我们在过程中查阅了相关资料，获取了您的客户信息，并执行了必要的操作，最终成功解决了您的问题，您可以检查一下结果是否符合预期。如有任何疑问，欢迎随时联系我们！”</p><p><strong>Agent → 人：</strong> “亲，关于您的问题，我们已经帮你解决好了。我们在过程中查阅了相关资料，获取了您的客户信息，并执行了必要的操作，最终成功解决了您的问题，您可以检查一下结果是否符合预期。如有任何疑问，欢迎随时联系我们！”</p><p><strong>人：</strong> 哇，让我检查一下。。。嗯，结果完全符合预期，真神奇！</p><hr><p><strong>Agent：</strong> 还不是多亏了我指挥你们俩干活，要不是我协调你们俩，你们谁也干不成这事儿。</p><p><strong>MCP Server：</strong> 拉倒吧，没有我定义这些函数/工具，再帮你们执行，你们啥也干不了，只能在那儿瞎想。</p><p><strong>LLM：</strong> 我是最强大脑，没有我理解问题、思考方案、决定用啥工具，你们俩也白搭，只能解决简单的事儿。</p><p><strong>Agent、MCP Server：</strong> 得了吧，你就是一个书呆子，光会读书不会干活，还老爱装逼，谁稀罕你啊！</p><p><strong>LLM：</strong> 我看呀，我们三位也别吵了，咱们各司其职，合作共赢不好吗？</p><p><strong>Agent、MCP Server：</strong> 这话说的不赖，合作共赢，咱们一起干大事儿！</p><h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>很多人会有个误解，认为 LLM 就是 Agent。事实是 LLM 本身只是一个强大的文本生成器，它只能充当“大脑”的身份，根据上下文生成下一步的输出，但不具备主动发起交互的能力。而服务端（比如说 MCP Server / 自己写的工具调用层 / 甚至只是简单的函数执行）就像是插在 Agent 上的“手”，Agent 传达大模型的输出指令给服务端，服务端负责把 Agent 的指令变成真实动作。</p><p>真正协调大模型与服务端交互、推进整体流程的，才是 Agent 。它更像是一种<strong>架构模式</strong>或者说控制层，包裹住了大模型与服务端，让它们协同工作。说到底，Agent 架构就是一个产品经理，在一个流程中去指挥 LLM 和服务端，让它们各司其职，允许不断的迭代和调整，最终达成用户目标。</p></article><div class="post-copyright"><div class="post-copyright__title"><span class="post-copyright-info"><h>对 AI Agent 的一些粗浅理解</h></span></div><div class="post-copyright__type"><span class="post-copyright-info"><a href="https://dingzh.cc/posts/d4e383e3.html">https://dingzh.cc/posts/d4e383e3.html</a></span></div><div class="post-copyright-m"><div class="post-copyright-m-info"><div class="post-copyright-a"><h>作者</h><div class="post-copyright-cc-info"><h>Dingzh</h></div></div><div class="post-copyright-c"><h>发布于</h><div class="post-copyright-cc-info"><h>2025-11-09</h></div></div><div class="post-copyright-u"><h>更新于</h><div class="post-copyright-cc-info"><h>2025-11-11</h></div></div><div class="post-copyright-c"><h>许可协议</h><div class="post-copyright-cc-info"><a class="icon" rel="noopener" target="_blank" title="Creative Commons" href="https://creativecommons.org/"><i class="fab fa-creative-commons"></i></a><a rel="noopener" target="_blank" title="CC BY-NC-SA 4.0" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a></div></div></div></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/AI/">AI</a><a class="post-meta__tags" href="/tags/Agent/">Agent</a></div><div class="post_share"><div class="social-share" data-image="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover217.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://npm.elemecdn.com/social-share.js/dist/css/share.min.css" media="print" onload='this.media="all"'><script src="https://npm.elemecdn.com/social-share.js/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button button--animated"><i class="fas fa-qrcode"></i> 打赏<div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="https://alicdn.dingzh.cc/ding-BlogDemo/img/wechat.jpg" target="_blank"><img class="post-qr-code-img" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/wechat.jpg" alt="微信"></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="https://alicdn.dingzh.cc/ding-BlogDemo/img/alipay.jpg" target="_blank"><img class="post-qr-code-img" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/alipay.jpg" alt="支付宝"></a><div class="post-qr-code-desc">支付宝</div></li></ul></div></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/posts/b95b9d3f.html"><img class="prev-cover" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover186.jpg" onerror='onerror=null,src="https://alicdn.dingzh.cc/ding-BlogDemo/img/404_img.jpg"' alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">AI Trip Assistant 复盘</div></div></a></div><div class="next-post pull-right"><a href="/posts/1383d4dc.html"><img class="next-cover" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover39.jpg" onerror='onerror=null,src="https://alicdn.dingzh.cc/ding-BlogDemo/img/404_img.jpg"' alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">阿里云CDN 配置国内外双源站策略，加快国内外访问</div></div></a></div></nav><hr><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i> <span>评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/head1.jpg" onerror='this.onerror=null,this.src="https://alicdn.dingzh.cc/ding-BlogDemo/img/imgLink_404.gif"' alt="avatar"></div><div class="author-info__name">Dingzh</div><div class="author-info__description">为之则易，不为则难</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">38</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">49</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div></div><a class="button--animated" id="card-info-btn" href="javascript:void(0)" onclick="addFav()"><i class="fas fa-star"></i><span>收藏本站</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/rplalala" target="_blank" title="Github"><i class="fab iconfont icon-github"></i></a><a class="social-icon" href="https://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&amp;email=dingzihang00@qq.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="https://gitee.com/rplalala" target="_blank" title="Gitee"><i class="fab iconfont icon-gitee-fill-round"></i></a><a class="social-icon" href="https://blog.csdn.net/RP123123123?spm=1000.2115.3001.5343" target="_blank" title="CSDN"><i class="fab iconfont icon-csdn1-copy"></i></a><a class="social-icon" href="https://leetcode-cn.com/u/dingzihang00/" target="_blank" title="LeetCode"><i class="fab iconfont icon-leetcode"></i></a><a class="social-icon" href="https://space.bilibili.com/6964209" target="_blank" title="Bilibili"><i class="fab iconfont icon-bilibili-fill"></i></a><a class="social-icon" href="https://i.y.qq.com/n2/m/share/details/taoge.html?id=3885764921" target="_blank" title="QQ音乐"><i class="fab iconfont icon-QQyinle"></i></a></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A6%82%E8%A6%81"><span class="toc-number">1.</span> <span class="toc-text">概要</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%AF%AF%E5%8C%BA%E7%82%B9%EF%BC%88workflow-vs-Agent%EF%BC%89"><span class="toc-number">2.</span> <span class="toc-text">误区点（workflow vs Agent）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%BF%9B%E4%B8%80%E6%AD%A5%E5%8C%BA%E5%88%86%EF%BC%88function-call-vs-%E8%87%AA%E4%B8%BB%E6%8E%A8%E8%BF%9B%EF%BC%89"><span class="toc-number">3.</span> <span class="toc-text">进一步区分（function_call vs 自主推进）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%9C%9F%E6%AD%A3%E7%9A%84-Agent%EF%BC%88function-call-%E8%87%AA%E4%B8%BB%E6%8E%A8%E8%BF%9B%EF%BC%89"><span class="toc-number">4.</span> <span class="toc-text">真正的 Agent（function_call + 自主推进）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Agent-%E4%B8%8E%E5%B7%A5%E4%BD%9C%E6%B5%81"><span class="toc-number">5.</span> <span class="toc-text">Agent 与工作流</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%80%E4%B8%AA%E5%85%B8%E5%9E%8B%E7%9A%84-Agent-%E5%B7%A5%E4%BD%9C%E6%B5%81%E7%A8%8B%E7%A4%BA%E4%BE%8B"><span class="toc-number">6.</span> <span class="toc-text">一个典型的 Agent 工作流程示例</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%80%BB%E7%BB%93"><span class="toc-number">7.</span> <span class="toc-text">总结</span></a></li></ol></div></div><div class="card-widget card-recommend-post"><div class="item-headline"><i class="fas fa-thumbs-up"></i><span>相关推荐</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/14f08eda.html" title="RAG / MCP / Prompt 和一些常用的 Agent 框架"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover155.jpg" alt="RAG / MCP / Prompt 和一些常用的 Agent 框架"></a><div class="content"><a class="title" href="/posts/14f08eda.html" title="RAG / MCP / Prompt 和一些常用的 Agent 框架">RAG / MCP / Prompt 和一些常用的 Agent 框架</a><time datetime="2025-11-11" title="发表于 2025-11-11">2025-11-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/b95b9d3f.html" title="AI Trip Assistant 复盘"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover186.jpg" alt="AI Trip Assistant 复盘"></a><div class="content"><a class="title" href="/posts/b95b9d3f.html" title="AI Trip Assistant 复盘">AI Trip Assistant 复盘</a><time datetime="2025-10-27" title="发表于 2025-10-27">2025-10-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/7a10715.html" title="什么是 MCP，什么是 MCP Server"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover16.jpg" alt="什么是 MCP，什么是 MCP Server"></a><div class="content"><a class="title" href="/posts/7a10715.html" title="什么是 MCP，什么是 MCP Server">什么是 MCP，什么是 MCP Server</a><time datetime="2025-11-11" title="发表于 2025-11-11">2025-11-11</time></div></div></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/b6ddf346.html" title="leetcode hot 100 刷题笔记"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover258.jpg" onerror='this.onerror=null,this.src="https://alicdn.dingzh.cc/ding-BlogDemo/img/404_img.jpg"' alt="leetcode hot 100 刷题笔记"></a><div class="content"><a class="title" href="/posts/b6ddf346.html" title="leetcode hot 100 刷题笔记">leetcode hot 100 刷题笔记</a><time datetime="2025-11-17T10:40:06.000Z" title="发表于 2025-11-17 18:40:06">2025-11-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/5b98c3b1.html" title="纯JWT TOKEN 和Redis + JWT TOKEN的区别和应用场景"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover122.jpg" onerror='this.onerror=null,this.src="https://alicdn.dingzh.cc/ding-BlogDemo/img/404_img.jpg"' alt="纯JWT TOKEN 和Redis + JWT TOKEN的区别和应用场景"></a><div class="content"><a class="title" href="/posts/5b98c3b1.html" title="纯JWT TOKEN 和Redis + JWT TOKEN的区别和应用场景">纯JWT TOKEN 和Redis + JWT TOKEN的区别和应用场景</a><time datetime="2025-11-16T16:24:56.000Z" title="发表于 2025-11-17 00:24:56">2025-11-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/14f08eda.html" title="RAG / MCP / Prompt 和一些常用的 Agent 框架"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover155.jpg" onerror='this.onerror=null,this.src="https://alicdn.dingzh.cc/ding-BlogDemo/img/404_img.jpg"' alt="RAG / MCP / Prompt 和一些常用的 Agent 框架"></a><div class="content"><a class="title" href="/posts/14f08eda.html" title="RAG / MCP / Prompt 和一些常用的 Agent 框架">RAG / MCP / Prompt 和一些常用的 Agent 框架</a><time datetime="2025-11-11T12:46:47.000Z" title="发表于 2025-11-11 20:46:47">2025-11-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/7a10715.html" title="什么是 MCP，什么是 MCP Server"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover16.jpg" onerror='this.onerror=null,this.src="https://alicdn.dingzh.cc/ding-BlogDemo/img/404_img.jpg"' alt="什么是 MCP，什么是 MCP Server"></a><div class="content"><a class="title" href="/posts/7a10715.html" title="什么是 MCP，什么是 MCP Server">什么是 MCP，什么是 MCP Server</a><time datetime="2025-11-11T08:05:27.000Z" title="发表于 2025-11-11 16:05:27">2025-11-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/1383d4dc.html" title="阿里云CDN 配置国内外双源站策略，加快国内外访问"><img src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover39.jpg" onerror='this.onerror=null,this.src="https://alicdn.dingzh.cc/ding-BlogDemo/img/404_img.jpg"' alt="阿里云CDN 配置国内外双源站策略，加快国内外访问"></a><div class="content"><a class="title" href="/posts/1383d4dc.html" title="阿里云CDN 配置国内外双源站策略，加快国内外访问">阿里云CDN 配置国内外双源站策略，加快国内外访问</a><time datetime="2025-11-09T17:28:32.000Z" title="发表于 2025-11-10 01:28:32">2025-11-10</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright"><span>&copy;2021 - 2025</span><svg style="width:1.5em;height:1.5em" aria-hidden="true"><use xlink:href="#icon-diqiu"></use></svg><span>Dingzh</span></div><div class="footer_custom_text"><span id="timeShow"></span></div><p id="ghbdages"><a class="github-badge" target="_blank" href="https://github.com/rplalala/rplalala.github.io" style="margin-inline:5px"><img src="https://img.shields.io/badge/Source-Github-d021d6?style=flat&amp;logo=GitHub" title="本站项目由Github托管"></a><a class="github-badge" target="_blank" href="https://gitee.com/rplalala/rplalala" style="margin-inline:5px"><img src="https://img.shields.io/badge/Mirror-Gitee-0cedbe?style=flat&amp;logo=Gitee" title="本站国内镜像由Gitee托管"></a><a class="github-badge" target="_blank" href="https://vercel.com/" style="margin-inline:5px"><img src="https://img.shields.io/badge/Hosted-Vercel-brightgreen?style=flat&amp;logo=Vercel" title="本站采用双线部署，默认线路托管于Vercel"></a><a class="github-badge" target="_blank" href="https://www.aliyun.com/" style="margin-inline:5px"><img src="https://img.shields.io/badge/CDN-Aliyun-orange?style=flat&amp;logo=AlibabaCloud" title="本站使用阿里云提供CDN加速"></a><a class="github-badge" target="_blank" href="https://beian.miit.gov.cn/" style="margin-inline:5px"><img src="https://img.shields.io/badge/%E9%97%BDICP%E5%A4%87-2022001031%E5%8F%B7-e1d492?style=flat&amp;logo=" title="本站已在工信部备案，备案号闽ICP备-2022001031号"></a><a class="github-badge" target="_blank" href="https://icp.gov.moe/?keyword=20221220" style="margin-inline:5px"><img src="https://img.shields.io/badge/%E8%90%8CICP%E5%A4%87-20221220%E5%8F%B7-fe1384?style-flat&amp;logo=" title="本站已加入萌ICP备，萌号萌ICP备-20221220号"></a><a class="github-badge" target="_blank" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" style="margin-inline:5px"><img src="https://img.shields.io/badge/Copyright-BY--NC--SA%204.0-d42328?style=flat&amp;logo=Claris" title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可"></a><a class="github-badge" target="_blank" href="https://butterfly.js.org/" style="margin-inline:5px"><img src="https://img.shields.io/badge/Theme-Butterfly-6513df?style=flat&amp;logo=bitdefender" title="主题版本为Butterfly_v3.8.4"></a><a class="github-badge" target="_blank" href="https://hexo.io/" style="margin-inline:5px"><img src="https://img.shields.io/badge/Frame-Hexo-blue?style=flat&amp;logo=hexo" title="博客框架为Hexo_v6.0.0"></a></p></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="font-plus" type="button" title="放大字体"><i class="fas fa-plus"></i></button><button id="font-minus" type="button" title="缩小字体"><i class="fas fa-minus"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><a class="icon-V hidden" onclick="switchNightMode()" title="浅色和深色模式转换"><svg width="25" height="25" viewBox="0 0 1024 1024"><use id="modeicon" xlink:href="#icon-moon"></use></svg></a><button id="change-bg-btn" type="button" title="更换背景" onclick="(function(b){var i=b.querySelector('i');if(i)i.classList.add('fa-spin');b.disabled=true;Promise.resolve(window.changeBackground &amp;&amp; changeBackground()).catch(function(e){try{console.error(e)}catch(e){}}).then(function(){if(i)i.classList.remove('fa-spin');b.disabled=false;});})(this)"><i class="fas fa-image"></i></button><button id="cycle-bg-mode-btn" type="button" title="背景模式" data-title-base="背景模式" data-random-label="随机背景" data-white-label="纯白背景" data-black-label="纯黑背景" onclick="window.cycleBackgroundMode &amp;&amp; cycleBackgroundMode(this)"><i class="fas fa-palette"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button><button id="to_comment" type="button" title="直达评论" onclick="FixedCommentBtn()"><i class="fas fa-comments"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"></div></div></div><hr><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="https://npm.elemecdn.com/jquery@latest/dist/jquery.min.js"></script><script src="https://alicdn.dingzh.cc/ding-BlogDemo/js/utils.min.js"></script><script src="https://alicdn.dingzh.cc/ding-BlogDemo/js/main.min.js"></script><script defer src="https://npm.elemecdn.com/instant.page/instantpage.js" type="module"></script><script src="https://npm.elemecdn.com/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script defer src="https://npm.elemecdn.com/node-snackbar/dist/snackbar.min.js"></script><script>function panguFn(){"object"==typeof pangu?pangu.autoSpacingPage():getScript("https://alicdn.dingzh.cc/ding-BlogDemo/js/other/pangu.min.js").then(()=>{pangu.autoSpacingPage()})}function panguInit(){panguFn()}document.addEventListener("DOMContentLoaded",panguInit)</script><script defer src="https://alicdn.dingzh.cc/ding-BlogDemo/js/search/local-search.min.js"></script><script async>var preloader={endLoading:()=>{document.body.style.overflow="auto",document.getElementById("loading-box").classList.add("loaded")},initLoading:()=>{document.body.style.overflow="",document.getElementById("loading-box").classList.remove("loaded")}};window.addEventListener("load",()=>{preloader.endLoading()}),setTimeout((function(){preloader.endLoading()}),2500)</script><div class="js-pjax"><script>(()=>{const t=document.getElementById("twikoo-count"),o=()=>{twikoo.init(Object.assign({el:"#twikoo-wrap",envId:"https://twikoo.dingzh.cc/",region:""},null))},n=()=>{twikoo.getCommentsCount({envId:"https://twikoo.dingzh.cc/",region:"",urls:[window.location.pathname],includeReply:!1}).then((function(o){t.innerText=o[0].count})).catch((function(t){console.error(t)}))},e=(e=!1)=>{"object"==typeof twikoo?(o(),e&&t&&setTimeout(n,0)):getScript("https://alicdn.dingzh.cc/ding-BlogDemo/js/other/twikoo.all.min.js").then(()=>{o(),e&&t&&setTimeout(n,0)})};btf.loadComment(document.getElementById("twikoo-wrap"),e)})()</script></div><script>window.addEventListener("load",()=>{const e=e=>{let t="";if(e.length)for(let n=0;n<e.length;n++){t+="<div class='aside-list-item'>";{const a="data-lazy-src";t+=`<a href='${e[n].url}' class='thumbnail'><img ${a}='${e[n].avatar}' alt='${e[n].nick}'></a>`}t+=`<div class='content'>\n        <a class='comment' href='${e[n].url}'>${e[n].content}</a>\n        <div class='name'><span>${e[n].nick} / </span><time datetime="${e[n].date}">${btf.diffDate(e[n].date,!0)}</time></div>\n        </div></div>`}else t+="没有评论";let n=document.querySelector("#card-newest-comments .aside-list");n.innerHTML=t,window.lazyLoadInstance&&window.lazyLoadInstance.update(),window.pjax&&window.pjax.refresh(n)},t=()=>{if(document.querySelector("#card-newest-comments .aside-list")){const t=saveToLocal.get("twikoo-newest-comments");t?e(JSON.parse(t)):(()=>{const t=()=>{twikoo.getRecentComments({envId:"https://twikoo.dingzh.cc/",region:"",pageSize:6,includeReply:!0}).then((function(t){const n=t.map(e=>{return{content:(t=e.comment,""===t||(t=(t=(t=(t=t.replace(/<img.*?src="(.*?)"?[^\>]+>/gi,"[图片]")).replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi,"[链接]")).replace(/<pre><code>.*?<\/pre>/gi,"[代码]")).replace(/<[^>]+>/g,"")).length>150&&(t=t.substring(0,150)+"..."),t),avatar:e.avatar,nick:e.nick,url:e.url+"#"+e.id,date:new Date(e.created).toISOString()};var t});saveToLocal.set("twikoo-newest-comments",JSON.stringify(n),10/1440),e(n)})).catch((function(e){document.querySelector("#card-newest-comments .aside-list").innerHTML="无法获取评论，请确认相关配置是否正确"}))};"object"==typeof twikoo?t():getScript("https://alicdn.dingzh.cc/ding-BlogDemo/js/other/twikoo.all.min.js").then(t)})()}};t(),document.addEventListener("pjax:complete",t)})</script><script async src="https://alicdn.dingzh.cc/ding-BlogDemo/js/custom/myJS.min.js"></script><script async src="https://at.alicdn.com/t/font_3113985_v9z1ah1pbeo.js"></script><script async src="https://at.alicdn.com/t/font_2032782_ev6ytrh30f.js"></script><script defer src="https://alicdn.dingzh.cc/ding-BlogDemo/js/custom/baidu_sub.min.js"></script><script data-pjax defer src="https://alicdn.dingzh.cc/ding-BlogDemo/js/custom/fixed_card_widget.min.js"></script><script data-pjax defer src="https://alicdn.dingzh.cc/ding-BlogDemo/js/custom/fixedComment_twikoo.min.js"></script><script src="https://alicdn.dingzh.cc/ding-BlogDemo/js/custom/sun_moon.min.js" async></script><script src="https://npm.elemecdn.com/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful=!0,POWERMODE.shake=!1,POWERMODE.mobile=!1,document.body.addEventListener("input",POWERMODE)</script><script id="click-heart" src="https://npm.elemecdn.com/butterfly-extsrc@1/dist/click-heart.min.js" async mobile="false"></script><script src="https://npm.elemecdn.com/pjax/pjax.min.js"></script><script>let pjaxSelectors=["title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show","#fixedcard-dashboard",".js-pjax"];var pjax=new Pjax({elements:'a:not([target="_blank"])',selectors:pjaxSelectors,cacheBust:!1,analytics:!1,scrollRestoration:!1});document.addEventListener("pjax:send",(function(){if(window.removeEventListener("scroll",window.tocScrollFn),window.removeEventListener("scroll",scrollCollect),"object"==typeof preloader&&preloader.initLoading(),window.aplayers)for(let e=0;e<window.aplayers.length;e++)window.aplayers[e].options.fixed||window.aplayers[e].destroy();"object"==typeof typed&&typed.destroy();const e=document.body.classList;e.contains("read-mode")&&e.remove("read-mode")})),document.addEventListener("pjax:complete",(function(){window.refreshFn(),document.querySelectorAll("script[data-pjax]").forEach(e=>{const t=document.createElement("script"),o=e.text||e.textContent||e.innerHTML||"";Array.from(e.attributes).forEach(e=>t.setAttribute(e.name,e.value)),t.appendChild(document.createTextNode(o)),e.parentNode.replaceChild(t,e)}),GLOBAL_CONFIG.islazyload&&window.lazyLoadInstance.update(),"function"==typeof chatBtnFn&&chatBtnFn(),"function"==typeof panguInit&&panguInit(),"function"==typeof gtag&&gtag("config","",{page_path:window.location.pathname}),"object"==typeof _hmt&&_hmt.push(["_trackPageview",window.location.pathname]),"object"==typeof Prism&&Prism.highlightAll(),"object"==typeof preloader&&preloader.endLoading()})),document.addEventListener("pjax:error",e=>{404===e.request.status&&pjax.loadUrl("/404.html")})</script><script async data-pjax src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="fixedcard-dashboard"><button class="fixedcard-activebtn" type="button" title="用户信息" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-info&quot;,&quot;0&quot;)"><i class="fas fa-address-book"></i></button><button class="fixedcard-activebtn" type="button" title="电子钟" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-clock&quot;,&quot;0&quot;)"><i class="fas fa-cloud-sun"></i></button><button class="fixedcard-activebtn" type="button" title="最新文章" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-recent-post&quot;,&quot;0&quot;)"><i class="fas fa-history"></i></button><button class="fixedcard-activebtn" type="button" title="相关推荐" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-recommend-post&quot;,&quot;0&quot;)"><i class="fas fa-thumbs-up"></i></button><div class="fixedcard-user-avatar fixedcard-activebtn" onclick="RemoveFixedCardWidget()"><img class="fixedcard-user-avatar-img" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/head1.jpg" title="Dingzh"></div></div><div class="app-refresh" id="app-refresh" style="position:fixed;top:-2.2rem;left:0;right:0;z-index:99999;padding:0 1rem;font-size:15px;height:2.2rem;transition:all .3s ease"><div class="app-refresh-wrap" style="display:flex;color:#fff;height:100%;align-items:center;justify-content:center"><label>🌈本站有新文章啦💌</label><a href="javascript:void(0)" onclick='top.location.href="/"'><span style="color:#fff;text-decoration:underline;cursor:pointer">🔎查看🤗</span></a></div></div><script>function showNotification(){if(GLOBAL_CONFIG.Snackbar){var t="light"===document.documentElement.getAttribute("data-theme")?GLOBAL_CONFIG.Snackbar.bgLight:GLOBAL_CONFIG.Snackbar.bgDark,e=GLOBAL_CONFIG.Snackbar.position;Snackbar.show({text:"🌈本站有新文章啦💌",backgroundColor:t,duration:5e5,pos:e,actionText:"🔎查看🤗",actionTextColor:"#fff",onActionClick:function(t){top.location.href="/"}})}else{var o=`top: 0; background: ${"light"===document.documentElement.getAttribute("data-theme")?"#49b1f5":"#1f1f1f"};`;document.getElementById("app-refresh").style.cssText=o}}"serviceWorker"in navigator&&(navigator.serviceWorker.controller&&navigator.serviceWorker.addEventListener("controllerchange",(function(){showNotification()})),window.addEventListener("load",(function(){navigator.serviceWorker.register("/sw.js")})))</script></div><script data-pjax>function card_artitalk_injector_config(){var a=document.getElementsByClassName("sticky_layout")[0];console.log("已挂载card_artitalk"),a.insertAdjacentHTML("afterbegin",'<div class="card-widget card-shuo"><div class="card-content" style="height:auto;min-height:280px;"><div class="item-headline"><i class="fas fa-comments"></i><span><a href="/artitalk/" title="artitalk page link">随言</a></span><a id="cardVisual" style="cursor:pointer;float:right" onclick="cardVisual()">编辑</a></div><div id="artitalk_main" style="width:100%;height:100%;padding:1px"></div></div></div>'),(()=>{const a=()=>{new Artitalk(Object.assign({appId:"5EG25co78od7O4GsnIcIySD9-MdYXbMMI",appKey:"e8zuU9tM3oRrN9kp9PWQwmYW"},{serverURL:"https://talkapi.dingzh.cc",lang:"zh",pageSize:1,color1:"#ff6262",color2:"#00a9c4",atEmoji:null}))};"function"==typeof Artitalk?a():getScript("https://npm.elemecdn.com/artitalk").then(a)})()}for(var elist="/artitalk/,/posts/".split(","),cpage=location.pathname,epage="/",flag=0,i=0;i<elist.length;i++)cpage.includes(elist[i])&&flag++;("all"===epage&&0==flag||epage===cpage)&&card_artitalk_injector_config()</script><script async src="https://alicdn.dingzh.cc/ding-BlogDemo/js/other/card_visual.min.js"></script><script data-pjax>function butterfly_clock_anzhiyu_injector_config(){var a=document.getElementsByClassName("sticky_layout")[0];console.log("已挂载butterfly_clock_anzhiyu"),a&&a.insertAdjacentHTML("afterbegin",'<div class="card-widget card-clock"><div class="card-glass"><div class="card-background"><div class="card-content"><div id="hexo_electric_clock"><img class="entered loading" id="card-clock-loading" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/loading.gif" style="height: 120px; width: 100%;" data-ll-status="loading"/></div></div></div></div></div>')}for(var elist="/archives/,/tags/,/categories/,/anime/,/gallery/,/artitalk/,/messageboard/,/link/,/about/".split(","),cpage=location.pathname,epage="all",qweather_key="dec7b69d45ab4dc4b9c3a6e8a13eb498",gaud_map_key="92c61ec107a5fc3b3abccc79ee948148",baidu_ak_key="undefined",flag=0,clock_rectangle="119.306239,26.075302",clock_default_rectangle_enable="false",i=0;i<elist.length;i++)cpage.includes(elist[i])&&flag++;("all"===epage&&0==flag||epage===cpage)&&butterfly_clock_anzhiyu_injector_config()</script><script src="https://pv.sohu.com/cityjson?ie=utf-8"></script><script data-pjax src="https://alicdn.dingzh.cc/ding-BlogDemo/clock/clock.min.js"></script><script data-pjax>function butterfly_swiper_injector_config(){var i=document.getElementsByClassName("recent-posts")[0];console.log("已挂载butterfly_swiper"),i.insertAdjacentHTML("afterbegin",'<div class="recent-post-item" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/d4e383e3.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover217.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-11-09</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/d4e383e3.html&quot;);" href="javascript:void(0);" alt="">对 AI Agent 的一些粗浅理解</a><div class="blog-slider__text">总结我目前 AI Agent 的一些粗浅理解</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/d4e383e3.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/b95b9d3f.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover186.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-10-28</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/b95b9d3f.html&quot;);" href="javascript:void(0);" alt="">AI Trip Assistant 复盘</a><div class="blog-slider__text">USYD 5620 小组项目AI Trip Assistant 复盘</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/b95b9d3f.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/7a10715.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover16.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-11-11</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/7a10715.html&quot;);" href="javascript:void(0);" alt="">什么是 MCP，什么是 MCP Server</a><div class="blog-slider__text">理解 MCP 协议及 MCP Server 的作用</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/7a10715.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/14f08eda.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover155.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-11-11</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/14f08eda.html&quot;);" href="javascript:void(0);" alt="">RAG / MCP / Prompt 和一些常用的 Agent 框架</a><div class="blog-slider__text">理解 RAG、MCP 和 Prompt 在 Agent 中的角色与区别，以及常用的 Agent 框架</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/14f08eda.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/8da89045.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover239.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-01-06</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/8da89045.html&quot;);" href="javascript:void(0);" alt="">seo优化超详细步骤 — hexo_butterfly</a><div class="blog-slider__text">搜索引擎收录博客详细步骤，并讲解如何对博客进行SEO优化</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/8da89045.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/b3f89ff3.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover117.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-01-05</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/b3f89ff3.html&quot;);" href="javascript:void(0);" alt="">JS、CSS异步加载优化方案</a><div class="blog-slider__text">拜读Akilar店长的文章后，自己对JS、CSS异步加载的总结与体会</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/b3f89ff3.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/b4caf892.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src="https://alicdn.dingzh.cc/ding-BlogDemo/img/cover/cover131.jpg" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-01-07</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/b4caf892.html&quot;);" href="javascript:void(0);" alt="">部署博客中各种踩坑点记录</a><div class="blog-slider__text">部署博客也有半个月了，中间遇到了许多坑点，这里总结一下常规操作吧（其实也没多少，懒得写- -）。持续更新~</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/b4caf892.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div></div>')}for(var elist="undefined".split(","),cpage=location.pathname,epage="/",flag=0,i=0;i<elist.length;i++)cpage.includes(elist[i])&&flag++;("all"===epage&&0==flag||epage===cpage)&&butterfly_swiper_injector_config()</script><script defer src="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.js"></script><script defer data-pjax src="https://alicdn.dingzh.cc/ding-BlogDemo/js/other/swiper_init.min.js"></script><div class="js-pjax"><script async>for(var arr=document.getElementsByClassName("recent-post-item"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__fadeIn"),arr[i].setAttribute("data-wow-duration",""),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script><script async>for(var arr=document.getElementsByClassName("card-widget"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__fadeIn"),arr[i].setAttribute("data-wow-duration",""),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script><script async>for(var arr=document.getElementsByClassName("article-sort-item"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__fadeIn"),arr[i].setAttribute("data-wow-duration","1.2s"),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script><script async>for(var arr=document.getElementsByClassName("flink-list-card"),i=0;i<arr.length;i++)arr[i].classList.add("wow"),arr[i].classList.add("animate__backInDown"),arr[i].setAttribute("data-wow-duration","1.2s"),arr[i].setAttribute("data-wow-delay",""),arr[i].setAttribute("data-wow-offset",""),arr[i].setAttribute("data-wow-iteration","")</script></div><script defer src="https://npm.elemecdn.com/hexo-butterfly-wowjs/lib/wow.min.js"></script><script defer src="https://npm.elemecdn.com/hexo-butterfly-wowjs/lib/wow_init.js"></script></body></html>